Skip to content

refactor(parameters): Consistently reference env#319

Merged
heitorlessa merged 5 commits into
aws-powertools:developfrom
gyft:refactor-appconfig
Mar 9, 2021
Merged

refactor(parameters): Consistently reference env#319
heitorlessa merged 5 commits into
aws-powertools:developfrom
gyft:refactor-appconfig

Conversation

@michaelbrewer
Copy link
Copy Markdown
Contributor

@michaelbrewer michaelbrewer commented Mar 8, 2021

Issue #, if available:

Description of changes:

Use the defined constants to look up service name environment variable

self.application = resolve_env_var_choice(
      choice=application, env=os.getenv(constants.SERVICE_NAME_ENV, "service_undefined")
)

NOTE: This does now defaults to service_undefined

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Use the defined constants to look up service name environment varialbe

NOTE: This does not default to `service_undefined`
@michaelbrewer
Copy link
Copy Markdown
Contributor Author

Sorry @heitorlessa i botched the commit message.

Copy link
Copy Markdown
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot Michael for fixing one more internal bit. I've added the new resolve_env_var_choice to ensure correctness and consistency across others.

Comment thread aws_lambda_powertools/utilities/parameters/appconfig.py Outdated
Michael Brewer and others added 3 commits March 9, 2021 06:38
@heitorlessa heitorlessa added internal Maintenance changes area/utilities labels Mar 9, 2021
@heitorlessa heitorlessa merged commit bc0b9cc into aws-powertools:develop Mar 9, 2021
heitorlessa added a commit that referenced this pull request Mar 9, 2021
…tools-python into develop

* 'develop' of https://github.com/awslabs/aws-lambda-powertools-python:
  feat(logging): Include exception_name (#320)
  chore: remove gatsby mention as migrated completed
  refactor(parameters): Consistently reference env (#319)
  docs(metrics): remove minimum dimensions
  docs: Correct code examples (#317)
  docs(metrics): Correct code examples in markdown (#316)
  fix(idempotency): TypeError when calling is_missing_idempotency_key with an int (#315)
  docs(metrics): Corrections to the code examples (#314)
  fix(idempotency): Correctly handle save_inprogress errors (#313)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Maintenance changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants